<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:76:"/www/wwwroot/qzp2.qhs.cc/public/../application/index/view/third/prepare.html";i:1592298768;s:67:"/www/wwwroot/qzp2.qhs.cc/application/index/view/layout/default.html";i:1591691133;s:64:"/www/wwwroot/qzp2.qhs.cc/application/index/view/common/meta.html";i:1588765311;s:66:"/www/wwwroot/qzp2.qhs.cc/application/index/view/common/script.html";i:1588765311;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?> – <?php echo $site['name']; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<?php if(isset($keywords)): ?>
<meta name="keywords" content="<?php echo $keywords; ?>">
<?php endif; if(isset($description)): ?>
<meta name="description" content="<?php echo $description; ?>">
<?php endif; ?>

<link rel="shortcut icon" href="/assets/img/favicon.ico" />

<link href="/assets/css/frontend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config: <?php echo json_encode($config); ?>
    };
</script>
        <link href="/assets/css/user.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
    </head>

    <body>

        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
            <div class="container">
                <div class="navbar-header">
                  <!--  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-navbar"> -->
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#"><?php echo $site['name']; ?></a>
                </div>
                <!-- <div class="collapse navbar-collapse" id="header-navbar">
                     <ul class="nav navbar-nav navbar-right">
                         <li><a href="<?php echo url('/'); ?>"><?php echo __('Home'); ?></a></li>
                         <li class="dropdown">
                             <?php if($user): ?>
                             <a href="<?php echo url('user/index'); ?>" class="dropdown-toggle" data-toggle="dropdown" style="padding-top: 10px;height: 50px;">
                                 <span class="avatar-img"><img src="<?php echo cdnurl($user['avatar']); ?>" alt=""></span>
                             </a>
                             <?php else: ?>
                             <a href="<?php echo url('user/index'); ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('User center'); ?> <b class="caret"></b></a>
                             <?php endif; ?>
                             <ul class="dropdown-menu">
                                 <?php if($user): ?>
                                 <li><a href="<?php echo url('user/index'); ?>"><i class="fa fa-user-circle fa-fw"></i><?php echo __('User center'); ?></a></li>
                                 <li><a href="<?php echo url('user/profile'); ?>"><i class="fa fa-user-o fa-fw"></i><?php echo __('Profile'); ?></a></li>
                                 <li><a href="<?php echo url('user/changepwd'); ?>"><i class="fa fa-key fa-fw"></i><?php echo __('Change password'); ?></a></li>
                                 <li><a href="<?php echo url('user/logout'); ?>"><i class="fa fa-sign-out fa-fw"></i><?php echo __('Sign out'); ?></a></li>
                                 <?php else: ?>
                                 <li><a href="<?php echo url('user/login'); ?>"><i class="fa fa-sign-in fa-fw"></i> <?php echo __('Sign in'); ?></a></li>
                                 <li><a href="<?php echo url('user/register'); ?>"><i class="fa fa-user-o fa-fw"></i> <?php echo __('Sign up'); ?></a></li>
                                 <?php endif; ?>

                             </ul>
                         </li>
                     </ul>
                 </div> -->
            </div>
        </nav>

        <main class="content">
            <div id="content-container" class="container">
    <div class="text-center">

    </div>
    <div class="user-section login-section" style="margin-top:20px;">
        <div class="logon-tab clearfix">
            <a href="javascript:" data-type="bind" class="active"><?php if($admin == '1'): ?>绑定老师<?php else: ?>绑定用户<?php endif; ?>：</a>
        </div>
        <div class="bind-main login-main">
            <form name="form" id="bind-form" class="form-vertical" method="POST" action="<?php if($admin == '1'): ?><?php echo url('user/admin'); else: ?><?php echo url('user/login'); endif; ?>">
                <?php echo token(); ?>
                <input type="hidden" name="platform" value="<?php echo $platform; ?>"/>
                <input type="hidden" name="url" value="<?php echo $url; ?>"/>
                <div class="form-group">
                    <label class="control-label"><?php if($admin == '1'): ?>用户名<?php else: ?>姓名<?php endif; ?>:</label>
                    <div class="controls">
                        <input type="text" id="nickname" name="nickname" data-rule="required"
                               class="form-control input-lg" placeholder="<?php if($admin == '1'): ?>请输入用户名<?php else: ?>请输入姓名<?php endif; ?>">
                        <p class="help-block"></p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label"><?php if($admin == '1'): ?>密码<?php else: ?>手机号<?php endif; ?>：</label>
                    <div class="controls">
                        <input type="<?php if($admin == '1'): ?>password<?php else: ?>int<?php endif; ?>" id="mobile" name="mobile" data-rule="required" class="form-control input-lg"
                               placeholder="<?php if($admin == '1'): ?>请输入密码<?php else: ?>请输入手机号<?php endif; ?>">
                        <p class="help-block"></p>
                    </div>
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-primary btn-block btn-lg"><?php echo __('确认绑定'); ?></button>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    require.callback = function () {
        define('frontend/third', ['jquery', 'bootstrap', 'frontend', 'template', 'form'], function ($, undefined, Frontend, Template, Form) {
            var Controller = {
                prepare: function () {
                    var validatoroptions = {
                        invalid: function (form, errors) {
                            $.each(errors, function (i, j) {
                                Layer.msg(j);
                            });
                        }
                    };

                    $(".user-section .logon-tab > a").on("click", function () {
                        $(".bind-main,.register-main").addClass("hidden");
                        $("." + $(this).data("type") + "-main").removeClass("hidden");
                        $(".user-section .logon-tab > a").removeClass("active");
                        $(this).addClass("active");
                    });

                    //本地验证未通过时提示
                    $("#register-form").data("validator-options", validatoroptions);

                    //为表单绑定事件
                    Form.api.bindevent($("#bind-form"), function (data, ret) {
                        location.href = "<?php echo $bindurl; ?>";
                        return false;
                    });

                    //为表单绑定事件
                    Form.api.bindevent($("#register-form"), function (data, ret) {
                        location.href = "<?php echo $bindurl; ?>";
                        return false;
                    }, function (data) {
                        $("input[name=captcha]").next(".input-group-addon").find("img").trigger("click");
                    });
                }
            };
            return Controller;
        });
    }
</script>
        </main>

     <footer class="footer" style="clear:both">
            <p class="copyright">Copyright&nbsp;©&nbsp;2017-2020 <?php echo $site['name']; ?> All Rights Reserved <a href="http://www.beian.miit.gov.cn" target="_blank"><?php echo htmlentities($site['beian']); ?></a></p>
        </footer>

        <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-frontend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>

    </body>

</html>